# from datetime import datetime
# import platform, platformdirs

# # print(platformdirs.user_data_dir('TimeLog', 'YunZen'))
# # print(platform.system()) # Windows Darwin Linix

# import sys
# import os
# import re

# import bisect
# from datetime import datetime

# # 假设 dts 是一个已排序的 datetime 列表
# dts = []


# # dt 是要查找的 datetime
# dt = datetime(2023,3,17,20,4,57,370013)
# print(dt)
# # 使用 bisect_left() 找到 dt 在 dts 中的插入位置
# index = bisect.bisect_right(dts, dt)
# print(len(dts), index)
# # 如果 index 为 0，说明 dt 比 dts 中的所有元素都小，没有在 dt 之前的元素
# if index == 0:
#     print("No datetime found before dt.")
# else:
#     # 返回插入位置之前的一个元素
#     last_dt_before = dts[index - 1]
#     print(last_dt_before)

# import cachetools
# cachetools.TTLCache(1000, )

# from datetime import datetime, timedelta

# from apscheduler.schedulers.background import BackgroundScheduler
# from apscheduler.schedulers.blocking import BlockingScheduler
# from apscheduler.triggers.interval import IntervalTrigger
# from apscheduler.triggers.date import DateTrigger

# scheduler = BackgroundScheduler()

# def job():
#     print('hello')

# trigger_time = datetime.now() + timedelta(seconds=3)
# trigger = DateTrigger(run_date=trigger_time)
# j = scheduler.add_job(job, trigger=trigger)
# print(j.id)
# scheduler.start()

# import time
# time.sleep(5)

# from fastapi import FastAPI

# app=FastAPI()

# # 添加首页
# @app.get("/")
# def index():
#     return "This is Home Page."
#     # uvicorn.run("tmp:app", host='127.0.0.1', port=8008, reload=True)



